﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Drawing;

namespace Kinect_Interface_Prototype_1.Folder_Control
{
    public class File : Item
    {
        // Constructor that gets file name from path
        public File(string path, Icon icon)
        {
            Name = GetName(path);
            Path = path;
            Type = ItemType.File;
            Icon = icon;
        }

        // Constructor where file name is passed in
        public File(string name, string path, Icon icon)
        {
            Name = name;
            Path = path;
            Type = ItemType.File;
            Icon = icon;
        }

        // Opens the file in the program specified by Windows
        public override List<Item> onClick()
        {
            Process.Start("explorer.exe", Path);
            return null;
        }
    }
}
